package com.mic.yzzn.plc.core.control.handler;

import com.mic.yzzn.plc.common.control.datastructure.PLCData;
import com.mic.yzzn.plc.common.control.datastructure.PLCMission;
import com.mic.yzzn.plc.common.control.datastructure.PLCMissionResult;
import com.mic.yzzn.plc.core.control.datastructure.PLCStationConfig;

import java.util.HashMap;
import java.util.UUID;
import java.util.concurrent.ConcurrentHashMap;

/**
 * Created by ASH on 16/7/18.
 *
 * Handler 接口
 */
public interface PLCMissionHandler {

    void setStationConfig(PLCStationConfig stationConfig) throws Exception;

    long handleCycleMission(PLCMission mission, ConcurrentHashMap<String, PLCData> resultMap, int waitTime);
    void handleReadMission(PLCMission mission, ConcurrentHashMap<UUID, PLCMissionResult> resultMap, int waitTime);
    void handleWriteMission(PLCMission mission, ConcurrentHashMap<UUID, PLCMissionResult> resultMap, int waitTime);

}
